package com.baorant.springbootdockerdemo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test")
public class TestController {
    private static final Logger logger = LoggerFactory.getLogger(TestController.class);

    @Value("${my.keyword}")
    public String keyword;

    @RequestMapping(value = "/keyword", method = RequestMethod.GET)
    public String printKeyword() {
        logger.info("TestController printKeyword: " + keyword);
        return keyword;
    }

}


